package com.xuecheng;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xuecheng.base.model.PageParam;
import com.xuecheng.content.mapper.CourseBaseMapper;
import com.xuecheng.content.model.dto.QueryCourseParamDto;
import com.xuecheng.content.model.po.CourseBase;
import com.xuecheng.content.model.po.PageResult;
import com.xuecheng.content.service.CourseBaseService;
import org.apache.commons.lang.StringUtils;
import org.junit.jupiter.api.Test;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @author 冯佳鑫 又菜又爱学
 * @version 1.0
 * @DATE now()
 */

@SpringBootTest()

@MapperScan(basePackages = "com.xuecheng.content.mapper")
public class CourBaseServicetest {
    @Autowired
    private CourseBaseMapper courseBaseMapper;
    @Autowired
    CourseBaseService courseBaseService;
    @Test
    void list(){

        PageParam pageParam = new PageParam();
        pageParam.setPageNo(1);
        pageParam.setPageSize(5);

        QueryCourseParamDto queryCourseParamDto = new QueryCourseParamDto();
        queryCourseParamDto.setCourseName("java");
//        queryCourseParamDto.setAuditStatus("202004");
        PageResult<CourseBase> courseBasePageResult = courseBaseService.QueryCoursebaseList(null,queryCourseParamDto, pageParam);
        System.out.println(courseBasePageResult);
        System.out.println(courseBasePageResult.getItems());


    }
}
